package com.example.spring.ioc.annotation.service;

import com.example.spring.ioc.annotation.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author lei yu
 * @date 2024/05/15
 */

@Service // @Component <bean>
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public void getBean() {
        System.out.println("UserServiceImpl");
        userDao.getUser();
    }
}
